package com.example.springboot.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.springboot.entity.Enroll;
import com.example.springboot.mapper.EnrollMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 功能：新闻相关
 * 作者：刘涵茹
 * 日期：2024/2/14 13:49
 */
@Service//通过注解注入spring容器
public class EnrollService extends ServiceImpl<EnrollMapper, Enroll> {
    @Resource
    EnrollMapper enrollMapper;
    public Enroll getByNewsId(Integer id) {
       return enrollMapper.getByNewsId(id);
    }
}
